Some host devices and data storage devices use data compression to efficiently utilize storage capacity of a memory. Data compression is performed by encoding data that includes a first set of bits to generate a second set of bits, where the second set of bits includes fewer bits than the first set of bits. Thus, compressed data is represented using fewer bits than were used to represent the original data. Accordingly, the compressed data can be stored in the memory using less of the memory's available storage capacity.
Generally, data compression removes redundant or unnecessary information from the data. Data compression tends to be more space-efficient when larger blocks of data are compressed together rather than when smaller blocks of data are compressed together. For example, when a large block of data is compressed, more of the bits may be considered redundant than would be the case if the large block of data were divided into a number of smaller blocks of data prior to compression. Thus, more bits may be removed by compressing the large block of data (as a unit) rather than by compressing the separate smaller blocks.
However, compression and decompression of data takes time and consumes power. Additionally, data that was compressed together generally must be decompressed as a whole, regardless of whether only a portion of the data is requested by the host device. Thus, while compressing a large block of unrelated data together may save space, when the host device requests a portion of the data, the entire large block (including unrelated portions) has to be decompressed to access the desired portion. Decompressing large blocks of data is time and power intensive. Also, delays associated with large block decompression operations may lead to a dissatisfactory user experience.